import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("user_education", { schema: "alumni" })
export class UserEducation {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("int", {
    name: "user_id",
    comment: "学历",
    unsigned: true,
    default: () => "'0'",
  })
  userId: number;

  @Column("tinyint", {
    name: "level",
    comment: "1：小学，2：中学，",
    unsigned: true,
    default: () => "'0'",
  })
  level: number;

  @Column("int", {
    name: "school_id",
    comment: "学校",
    unsigned: true,
    default: () => "'0'",
  })
  schoolId: number;

  @Column("year", {
    name: "graduate_date",
    nullable: true,
    comment: "毕业年份",
  })
  graduateDate: number | null;

  @Column("varchar", { name: "class_name", comment: "班级", length: 100 })
  className: string;
}
